<include file="Public/min-header"/>
<div class="wrapper">
    <include file="Public/breadcrumb"/>
    <section class="content" style="padding:0px 15px;">
        <!-- Main content -->
        <div class="container-fluid">
            <div class="pull-right">
                <a href="javascript:history.go(-1)" data-toggle="tooltip" title="" class="btn btn-default" data-original-title="返回"><i class="fa fa-reply"></i></a>
                <a onclick="get_help(this)" data-url="http://www.tp-shop.cn/Doc/Indexbbc/article/id/1064/developer/user.html" class="btn btn-default" href="javascript:;"><i class="fa fa-question-circle"></i> 帮助</a>
            </div>
            <div class="panel panel-default">           
                <div class="panel-body ">   
                    <include file="store_setting_navtabs"/>
                    <!--表单数据-->
                    <form method="post" id="handlepost" action="{:U('Store/setting_save')}">                    
                        <!--通用信息-->
                    <div class="tab-content" style="padding:20px 0px;">                 	  
                        <div class="tab-pane active" id="tab_tongyong">                           
                            <table class="table table-bordered">
                                <tbody> 
                                <tr><td>店铺等级：</td>
                                	<td colspan="2">{$store.grade_name}</td>
                                </tr>
                                <tr><td>店铺名称：</td>
                                	<td><input type="text" name="store_name" value="{$store.store_name}"></td>
                                	<td></td>
                                </tr>
                                <tr>
                                    <td>主营商品：</td>
                                    <td><textarea rows="4" name="store_zy" cols="80" >{$store.store_zy}</textarea></td>
                               		<td class="text-warning">关键字最多可输入50字，请用","进行分隔，例如”男装,女装,童装”</td>
                                </tr>
                                <!--   
                              	<tr>
                                    <td>店铺二维码：</td>
                                    <td>                     		
            							<img src="" height="100px" title="">
                                    </td>
                                    <td class="text-warning">保存后，生成新的二维码</td>
                                </tr>  
                                -->                             
                                <tr>
                                    <td>店铺LOGO：</td>
                                    <td><div style="width: 200px;height: 80px;">
                                    		 <img height="80" id="store_logo" src="<empty name='store.store_logo'><else/>{$store.store_logo}</empty>" nc_type="store_label">
         								 </div>
         								 <input type="hidden" name="store_logo" value="{$store.store_logo}">
                         		 		<input type="button" class="button" onClick="GetUploadify(1,'store_logo','seller','callback1')"  value="上传  logo"/>
                                   </td>
                                	<td  class="text-warning">建议使用宽200像素-高60像素内的GIF或PNG透明图片；点击下方"提交"按钮后生效。</td>
                                </tr>                                    
                            	<tr>
                                    <td>店铺banner：</td>
                                    <td><div style="height:100px;">
                                    		 <img height="120" id="store_banner" src="<empty name='store.store_banner'>__PUBLIC__/images/not_adv.jpg<else/>{$store.store_banner}</empty>" nc_type="store_label">
         								 </div>
         								 <input type="hidden" name="store_banner" value="{$store.store_banner}">
                                     </td>
                                	<td >
                                		<span class="text-warning">建议使用宽1000像素*高250像素的图片；点击下方"提交"按钮后生效。</span>
                                		<p><input type="button" class="button" onClick="GetUploadify(1,'store_banner','seller','callback2')"  value="上传banner"/></p>
                                		<p>banner背景颜色<input class="form-control" name="bgcolor" type="color" value="{$info.bgcolor}" style="width:200px;"/></p>
                                	</td>
                                </tr>
                                
                                <tr>
                                    <td>店铺电话：</td>
                                    <td colspan="2"><input type="text"  pattern="^\d{1,}$" title="只能输入数字"  class="input-sm" name="store_phone" value="{$store.store_phone}"></td>
                                </tr>
                                <tr>
                                	<td>客服QQ：</td>
                                	<td colspan="2"><input type="number" name="store_qq" class="input-sm" value="{$store.store_qq}"></td>
                                </tr>
                                <tr>
                                    <td>阿里旺旺：</td>
                                    <td colspan="2"><input type="text" name="store_aliwangwang" class="input-sm" value="{$store.store_aliwangwang}"></td>
                                </tr>
                                <tr>
                                	<td>店铺地址：</td>
                                	<td colspan="2">
                                	   <div class="col-xs-2">
                                        <select onchange="get_city(this)" id="province" name="province_id" class="form-control" style="margin-left:-15px;">
                                            <option  value="0">选择省份</option>
                                            <volist name="province" id="vo">
                                                <option value="{$vo.id}" <if condition="$store[province_id] eq $vo[id]">selected</if>>{$vo.name}</option>
                                            </volist>
                                        </select>
                                        </div>   
                                        <div class="col-xs-2">                                        
                                        <select onchange="get_area(this)" id="city" name="city_id" class="form-control">
                                            <option value="0">选择城市</option>
                                            <volist name="city" id="vo">
                                                <option value="{$vo.id}" <if condition="$store[city_id] eq $vo[id]">selected</if>>{$vo.name}</option>
                                            </volist>
                                        </select>
                                        </div>   
                                        <div class="col-xs-2">                                        
                                        <select id="district" name="district" class="form-control">
                                            <option value="0">选择区域</option>
                                            <volist name="area" id="vo">
                                                <option value="{$vo.id}" <if condition="$store[district] eq $vo[id]">selected</if>>{$vo.name}</option>
                                            </volist>
                                        </select>
                                        </div> 
                                        <div class="col-xs-3">
                                        	<input type="text" placeholder="详细地址" class="form-control" name="store_address" value="{$store.store_address}">
                                        </div>      
                                	</td>
                                </tr>
                                <tr>
                                    <td>满多少免运费：</td>
                                    <td><input type="text" class="form-control" name="store_free_price" value="{$store.store_free_price}" onkeyup="this.value=this.value.replace(/[^\d.]/g,'')" onpaste="this.value=this.value.replace(/[^\d.]/g,'')" style="width: 100px;"></td>
                                    <td class="text-warning">超出该金额免运费，大于0才表示该值有效</td>
                                </tr>
                                <tr>
                                	<td>SEO关键字：</td>
                                	<td><input type="text" class="form-control" name="seo_keywords" value="{$store.seo_keywords}"></td>
                                	<td class="text-warning">用于店铺搜索引擎的优化，关键字之间请用英文逗号分隔</td>
                                	
                                </tr>  
                                <tr>
                                	<td>SEO店铺描述：</td>
                                	<td colspan="2">
                                		<textarea rows="4" cols="80" name="seo_description">{$store.seo_description}</textarea>
                                	</td>
                                </tr>          
                                </tbody> 
                                <tfoot>
                                	<tr>
                                	<td><input type="hidden" name="store_id" value="{$store.store_id}"></td>
                                	<td></td>
                                	<td class="text-right"><input class="btn btn-primary" type="button" onclick="adsubmit()" value="保存"></td>
                                	</tr>
                                </tfoot>                               
                                </table>
                        </div>                           
                    </div>              
			    	</form><!--表单数据-->
                </div>
            </div>
        </div>
    </section>
</div>

<script>
function adsubmit(){
	$('#handlepost').submit();
}

function goset(obj){
	window.location.href = $(obj).attr('data-url');
}

function callback1(img_str){
	$('input[name="store_logo"]').val(img_str);
	$('#store_logo').attr('src',img_str);
}

function callback2(img_str){
	$('input[name="store_banner"]').val(img_str);
	$('#store_banner').attr('src',img_str);
}
</script>
</body>
</html>